package com.mall.user.domain.model;

public record Email(String email) {
    public Email{
        if(email == null || email.isEmpty()){
            throw new IllegalArgumentException("邮箱不能为空");
        }
    }

    public static Email of(String email){
        return new Email(email.trim());
    }
}
